package com.huitu.whht.ribbon_customer_feign.Controller;

import com.huitu.whht.ribbon_customer_feign.Service.HelloSevice;
import com.huitu.whht.ribbon_customer_feign.Service.ISzyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class CustomerController {

    @Autowired
    HelloSevice helloSevice;

    @Autowired
    ISzyService szyService;

    @RequestMapping("/helloFeign")
    String customer(){
        return helloSevice.hello();
    }

    @RequestMapping(value = "/szy",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ResponseBody
    Object selectList(){
        return szyService.selectList();
    }
}
